import type { RouteRecordRaw } from 'vue-router';

import { $t } from '#/locales';

const routes: RouteRecordRaw[] = [
  {
    meta: {
      icon: 'lucide:calculator',
      order: 1,
      title: $t('page.settlement.title'),
    },
    name: 'Settlement',
    path: '/settlement',
    children: [
      {
        name: 'TaskCenter',
        path: '/task-center',
        component: () => import('#/views/settlement/task-center/index.vue'),
        meta: {
          icon: 'lucide:briefcase',
          title: $t('page.settlement.taskCenter'),
        },
      },
      {
        name: 'BusinessSettlement',
        path: '/business-settlement',
        component: () => import('#/views/settlement/business-settlement/index.vue'),
        meta: {
          icon: 'lucide:receipt',
          title: $t('page.settlement.businessSettlement'),
        },
      },
      {
        name: 'SettlementDetail',
        path: 'settlement-detail/:id',
        component: () => import('#/views/settlement/settlement-detail/index.vue'),
        meta: {
          hideInMenu: true,
          title: $t('page.settlement.settlementDetail'),
        },
      },
      {
        name: 'TaskDetail',
        path: 'task-detail/:id',
        component: () => import('#/views/settlement/task-detail/index.vue'),
        meta: {
          hideInMenu: true,
          title: $t('page.settlement.taskDetail'),
        },
      },
      {
        name: 'TaskPublish',
        path: 'task-publish',
        component: () => import('#/views/settlement/task-publish/index.vue'),
        meta: {
          hideInMenu: true,
          title: $t('page.settlement.taskPublish'),
        },
      },
      {
        name: 'Freelancer',
        path: '/freelancer',
        component: () => import('#/views/settlement/freelancer/index.vue'),
        meta: {
          icon: 'lucide:users',
          title: $t('page.settlement.freelancer'),
        },
      },
    ],
  },
];

export default routes;
